# -*- mode: snippet -*-
# name: proc sql
# key: sql
# --
proc sql;
create table $1 as
select
a.${2:*}, b.$3
from $4 a
${5:$$(yas/choose-value '("inner join" "left join" "right join" "full join"))}
$6 b
on a.${7:subjid}=b.$7${8: and $9}
$0${10:where $11
}${12:group by $13
}${14:having $15
};
quit;